package com.egene.tw.fcm;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by albert on 2017/11/7.
 */

public class BootCompletedReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if("android.permission.RECEIVE_BOOT_COMPLETED".equals(action)){
            context.startService(new Intent(context, AppFirebaseInstanceIDService.class));
            context.startService(new Intent(context, AppFirebaseMessagingService.class));
        }
    }
}
